<template>
  <div>
    <!--  event 是实参 vue的内置对象-->
    <a @click ="toBaidu('百度真牛', $event)" href="http://www.baidu.com">百度</a>
  </div>
</template>

<script>
export default {
methods :{
  toBaidu(msg,e) {
    console.log('我被点了:',msg);
    e.preventDefault()
  }
}
}
</script>

<style>

</style>